import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)


// 引入相应的路由组件
import home from "../components/home.vue";
import member from "../components/member.vue";
import shopping from "../components/shopping.vue";
import search from "../components/search.vue";
import newlist from "../components/newlist/newlist.vue";
import newinfo from "../components/newlist/newinfo.vue";
import photoshare from "../components/photoshare/photoshare.vue";
import photoinfo from "../components/photoshare/photoinfo.vue";
import goodslist from "../components/goods/goodslist.vue";
import goodsinfo from "../components/goods/goodsinfo";
import goodsintrodu from "../components/goods/goodsintrodu.vue";
import goodscomment from "../components/goods/goodscomment.vue";

export default new Router({
  routes: [
    {path: '/', component: home, alias: '/home' },
    {path:"/home",component:home},
    {path:"/member",component:member},
    {path:"/shopping",component:shopping},
    {path:"/search",component:search},
    {path:"/home/newlist",component:newlist},
    {path:"/home/newinfo/:id",component:newinfo},
    {path:"/home/photoshare",component:photoshare},
    {path:"/home/photoinfo/:id",component:photoinfo},
    {path:"/home/goodslist",component:goodslist},
    {path:"/home/goodsinfo/:id",component:goodsinfo},
    {path:"/home/goodsIntrodu/:id",component:goodsintrodu,name:"goodsintrodu"},
    {path:"/home/goodscomment/:id",component:goodscomment,name:"goodscomment"}
  ],
  linkActiveClass:"mui-active"
})
